from flask_restful import fields
from fields.timbre_fields_def import base_timbre_fields
from fields.emoji_pack_fields_def import base_emoji_pack_fields

base_character_fields = {
    "id": fields.String,
    "name": fields.String,
    "personality": fields.String,
    "default_timbre_id": fields.String,
    "config": fields.Raw,
    "default_emoji_pack_id": fields.String,
    "appearance_url": fields.String,
    "appearance_file_id": fields.String,
    "appearance_file_url": fields.String,
    "wakeup_sentences": fields.List(fields.String),
    "stepback_sentences": fields.List(fields.String),
    "busy_sentences": fields.List(fields.String),
    "greet_sentence": fields.String,
    "price": fields.Float(attribute="Price")
}

character_fields = {
    "id": fields.String,
    "name": fields.String,
    "personality": fields.String,
    "default_timbre_id": fields.String,
    "default_timbre": fields.Nested(base_timbre_fields),
    "config": fields.Raw,
    "default_emoji_pack_id": fields.String,
    "default_emoji_pack": fields.Nested(base_emoji_pack_fields),
    "appearance_url": fields.String,
    "appearance_file_id": fields.String,
    "appearance_file_url":fields.String,
    "wakeup_sentences": fields.List(fields.String),
    "stepback_sentences": fields.List(fields.String),
    "busy_sentences": fields.List(fields.String),
    "greet_sentence": fields.String,
    "price": fields.Float(attribute="Price")
}

character_list_fields =  {
    "total":fields.Integer,
    "has_more":fields.Boolean,
    "data":fields.List(fields.Nested(character_fields))
}